#include<stdio.h>
int main()
{
    int n;
    char s[100];
    freopen("IO4.in","r",stdin);

    gets(s);
    sscanf(s,"%d",&n);
    while(n--)
    {
        gets(s);
        printf("%d\n",strlen(s));
    }
    return 0;
}
